The conventional wisdom in the computer architecture world is that data to be operated on should be moved into a more transitory memory, such as random access memory (RAM) or the like, whenever possible. This piece of conventional wisdom is based on a variety of factors including the facts that RAM, hardware caches, and the like, generally are “close” to the processor core that ultimately will do the work on the data and that they can be accessed much more quickly than non-transitory storage media. Moving data into memory for processing therefore is seen to increase speed, lower disk thrashing, etc.
To keep up with the ever-increasing demand for processing power and speed, hardware cache and RAM sizes have increased dramatically since the advent of the microprocessor. The desire to increase speed and microprocessor development in general also have led to instruction set optimizations, multi-level hardware cache implementations, multi-core processor technology, etc. These improvements have been beneficial and, indeed, have transformed society by making computers a facet—seen or unseen—in countless aspects of one's everyday life.
Yet none of these improvements has truly challenged the accepted fact that data should be moved into main memory before it is operated on, or the industry-wide bias towards trying to make main memory larger, e.g., for Big Memory and Big Data related applications. The reliance on these “old ways” could be problematic as the data volumes maintained in memory continue to rise and could possibly move beyond levels that are pragmatic or possible in some cases. It would be desirable to address this possible problem. Moreover, it would be desirable to take advantage of non-transitory media for tasks traditionally reserved for more transitory media (e.g., RAM, hardware caches, and the like), e.g., from cost and/or performance perspectives.
In a typical computer system, data will first be loaded into main memory and it will be swapped out to disk only if required. There are some current technologies that allow for “spill over” to disk drive devices such as, for example, virtual memory approaches. Other technologies allow for “spill over” to solid state drives (SSDs), which are data storage devices that typically use integrated circuit (IC) assemblies as memory to store data persistently. SSDs generally have no moving (mechanical) components, which helps distinguish them from traditional electromechanical magnetic disks such as hard disk drives (HDDs) that include spinning disks and movable read/write heads. Compared with electromechanical disks, SSDs are typically more resistant to physical shock, run more quietly, have lower access times/less latency, etc. In general, the characteristics of SSDs are somewhat between RAM (direct memory) storage and disk (HDD) medium. Using the Elastic Data feature of Oracle Coherence, for example, memory can spill over to an SSD device as required, increasing memory size, and returning back to core memory when usage drops. In this way, the size of the core memory becomes elastic.
The inventors have realized, however, that not all data elements are equally important to a particular application. For instance, not all data elements are equally important in a business environment. Indeed, in some cases, data that is new and/or accessed frequently might be more important to a given business or other application that is old and/or accessed less frequently. The inventors also have realized that the application programmers, business processor modelers, and/or others, oftentimes are able to identify this more important information in advance.
Certain example embodiments thus do not adopt the conventional wisdom that all data to be operated on should be loaded into memory whenever possible and similarly do not merely adopt the automatic spill-over approach described above, e.g., where application programmers cannot influence the memory strategy of a business or other application.
Instead, certain example embodiments involve allowing specific, configurable, data fields to be “pinned” to transitory or non-transitory (e.g., RAM or SSD) computer readable storage media. In this regard, there is no swapping or spill over involved once a data field has its “pinned” attribute set—the field either goes to the transitory or to the non-transitory (RAM or SSD) computer readable storage medium, directly and without getting swapped.
One aspect of certain example embodiments relates to the ability to specify which elements, maintained in memory, should be stored to a non-transitory computer readable storage medium (such as, for example, an SSD device or the like), instead of a more transitory computer readable storage medium like RAM or hardware cache as would be conventionally attempted. This configuration may be accomplished at various levels, beginning with the lowest element level, in certain example embodiments.
Another aspect of certain example embodiments relates to a real-time memory manager that enables certain elements to be “pinned” to a non-transitory computer readable storage medium, even when they are used in computer processor operations. The memory manager of certain example embodiments may, for instance, help “sync-up” data stored in the in-memory system with that stored to the non-transitory computer readable storage medium environment, e.g., making where the data is coming from more transparent to the application operating on it.
Another aspect of certain example embodiments relates to enabling application programmers (e.g., business application programmers who implement business logic) to more actively make use of SSD devices and/or other non-transitory computer readable storage media as opposed to RAM for purposes other than longer-term persistence of data. Application programmers can in certain example instances thus allow data that does not have the same latency requirements as data kept in RAM to be kept in an SSD device or the like, thereby lowering the overall cost of the deployment in a manner that is safe. In this latter regard, although requiring an application to go to a slower storage tier for data might, from a general performance perspective, be regarded as more risky than the conventional approaches described above, application programmers are likely to have detailed knowledge about how data is used and, thus, what data can be pinned where, in a manner that is beneficial (or at least neutral) from a performance perspective and advantageous from one or more other perspective (such as cost, ease of implementation, etc.).
Still another aspect of certain example embodiments relates to providing flexibility in how the pinning can be performed. For instance, “fixed rules” may be applied, queries may be run, learning algorithms may be employed, etc., e.g., in pinning/unpinning entire data caches and/or parts thereof to/from a particular storage medium. Still further, certain example embodiments include an API, through which an application and/or application programmer can manipulate pinning flags, even at runtime. This approach is flexible and can be dynamic, as well.
In certain example embodiments, there is provided a computer system comprising at least one processor, a non-transitory computer readable storage medium, and a transitory computer readable storage medium. A memory manager, in cooperation with the at least one processor, is configured to receive requests to store and retrieve data in connection with execution of an application, and for each said received request: determine whether the data associated with the respective received request is part of a data cache that is pinned to the non-transitory computer readable storage medium; in response to a determination that the data associated with the respective received request is part of a data cache that is pinned to the non-transitory computer readable storage medium, handle the respective received request using the non-transitory computer readable storage medium rather than the transitory computer readable storage medium; determine whether the data associated with the respective received request itself is pinned to the non-transitory computer readable storage medium; in response to a determination that the data associated with the respective received request itself is pinned to the non-transitory computer readable storage medium, handle the respective received request using the non-transitory computer readable storage medium rather than the transitory computer readable storage medium; and in response to determinations that the data associated with the respective received request is not part of a data cache that is pinned to the non-transitory computer readable storage medium and that the data associated with the respective received request itself is not pinned to the non-transitory computer readable storage medium, (a) determine which one of the non-transitory computer readable storage medium and the transitory computer readable storage medium should be used in handling the respective received request, and (b) handle the respective received request in accordance with the determination made in (a).
In certain example embodiments, there is provided a method of managing memory in a computer system including at least one processor, a non-transitory computer readable storage medium, and a transitory computer readable storage medium. Requests to store and retrieve data in connection with execution of an application are received. For each said received request: in response to a determination that the data associated with the respective received request is part of a data cache that is pinned to the non-transitory computer readable storage medium, the respective received request is handled using the at least one processor and the non-transitory computer readable storage medium rather than the transitory computer readable storage medium; in response to a determination that the data associated with the respective received request itself is pinned to the non-transitory computer readable storage medium, the respective received request is handled using the at least one processor and the non-transitory computer readable storage medium rather than the transitory computer readable storage medium; and in response to determinations that the data associated with the respective received request is not part of a data cache that is pinned to the non-transitory computer readable storage medium and that the data associated with the respective received request itself is not pinned to the non-transitory computer readable storage medium, (a) a determination is made as to which one of the non-transitory computer readable storage medium and the transitory computer readable storage medium should be used in handling the respective received request, and (b) the respective received request is handled in accordance with the determination made in (a).
In certain example embodiments, there is provided a method of managing memory in a computer system that is configured to execute an application and that includes at least one processor, a non-transitory computer readable storage medium, and a transitory computer readable storage medium. Instructions to force at least one identified data element and/or cache of data elements to be stored to, and searched for in, the non-transitory computer readable storage medium during application execution, is/are received. The received instructions are instrumental in preventing any data elements and/or caches of data elements associated therewith from being moved between the non-transitory computer readable storage medium and the transitory computer readable storage medium during application execution.
Non-transitory computer readable storage mediums tangibly storing instructions for performing the above-summarized and/or other approaches also are provided by certain example embodiments, as well as corresponding computer programs.
These features, aspects, advantages, and example embodiments may be used separately and/or applied in various combinations to achieve yet further embodiments of this invention.